/*
 * iShopPlace Project.
 */
package ishopplace.model.dao.helper;

/**
 * To follow the design of the original Java Pet Store application 
 * a sequence table is used to generate the order id. 
 * <p>
 * The Hibernate does not allow to map a table without primary key.
 * Schema is changed and a primary key column 'name' is added. 
 * 
 * @author <a href="mailto:derek@derekshen.com">Derek Y. Shen</a>
 */
public class Sequence {
    private String name;
    private int seqnum;
    
    public Sequence() {
    }
    
    public String getName() {
        return this.name;
    }
    
    public void setName(String newName) {
        this.name = newName;
    }
    
    public int getSeqnum() {
        return this.seqnum;
    }
    
    public void setSeqnum(int newSeqnum) {
        this.seqnum = newSeqnum;
    }
    
    public void increment() {
        this.seqnum++;
    }
}
